import request from '@/utils/request'

// 获取学生基本信息
export function getStudentBaseInfo(personCode) {
  return request({
    url: '/api/student/get_studentbaseinfo_by_xu',
    method: 'get',
    params: { personCode }
  })
}
//体侧数据
export  function  getHealthPq(personCode){
  return request({
    url: '/api/student/health_pq',
    method: 'get',
    params: { personCode }
  })
}
//体质数据
export function getHealthPe(personCode){
  return request({
    url: '/api/student/health_pe',
    method: 'get',
    params: { personCode }
  })
}
//就医汇总
export function getHealthMedical(query){
  return request({
    url: '/api/student/health_medical_sum',
    method: 'get',
    params: query
  })
}

//就医详情
export  function gethealthDetail(query) {
  return request({
    url: '/api/student/health_medical_detail',
    method: 'get',
    params: query
  })
}
//BMI的维度区间数据
export function getBmiRange(query) {
  return request({
    url: '/api/student/health_bmi',
    method: 'get',
    params: query
  })
}

//食物分类摄入量数据
export function getFoodcate(query){
  return request({
    url: '/api/student/health_food_cate',
    method: 'get',
    params: query
  })
}
//食物分类摄入量标准数据
export function getFoodDrisFc(query){
  return request({
    url: '/api/student/health_dris_fc',
    method: 'get',
    params: query
  })
}
//营养摄入量数据
export function getHealthNutrition(query){
  return request({
    url: '/api/student/health_nutrition',
    method: 'get',
    params: query
  })
}
//营养摄入量标准数据
export function getHealthDris(query){
  return request({
    url: '/api/student/health_dris',
    method: 'get',
    params: query
  })
}

 // 学生总分及排名
export function getStudy_total_rank(xh){
  return request({
    url: '/api/student/study_total_rank',
    method: 'get',
    params: { xh }
  })
}

// 学生成绩-最高分和平均分数据
export function getStudy_total_score(xh){
  return request({
    url: '/api/student/study_max_avg',
    method: 'get',
    params: { xh }
  })
}

// 学生成绩-最近5次考试总分
export function getStudy_last_exams_score(xh){
  return request({
    url: '/api/student/study_last_exams_score',
    method: 'get',
    params: { xh }	

  })
}

// 学生成绩-每次考试分科成绩数据
export function getStudy_subject_score(xh,examDate){
  return request({
    url: '/api/student/study_subject_score',
    method: 'get',
    params: { xh,examDate }
  })
}



// 学生成绩-最近一次考试的每科成绩及排名数据
export function getStudy_last_score(xh){
  return request({
    url: '/api/student/study_last_subject_score',
    method: 'get',
    params: { xh }
  })
}

// 学生成绩-最近一次考试每个学科的年级最高分数据
export function getStudy_grade_max(xh){
  return request({
    url: '/api/student/study_last_max_score',
    method: 'get',
    params: { xh }
  })
}

//学年学期数据
export function getHealthXnxq(xj) {
  return request({
    url: '/api/student/health_xnxq',
    method: 'get',
    params: { xj }
  })
}

// 获取综合素质评价雷达图数据
export function getEvaluateCount(studentId) {
  return request({
    url: '/api/student/evaluate_count_stat',
    method: 'get',
    params: { studentId }
  })
}

// 获取综合素质评价二级联动数据
export function getSubEvaluateCount(studentId, pid) {
  return request({
    url: '/api/student/sub_evaluate_count_stat',
    method: 'get',
    params: { studentId, pid }
  })
}

// 荣誉特长关键字
export function honor_talent_keys(studentId) {
  return request({
    url: '/api/student/honor_talent/keys',
    method: 'get',
    params: { studentId }
  })
}

// 荣誉特长列表
export function honor_talent_list(studentId,size) {
  return request({
    url: '/api/student/honor_talent/list',
    method: 'get',
    params: { studentId ,size}
  })
}
//学生成长记录获取列表
export function getGrowthRecords(studentId) {
  return request({
    url: '/api/student/growth-records',
    method: 'get',
    params: { studentId}
  })
}
//学生测评项详细内容
export function getEvaluateDetail(id) {
  return request({
    url: '/api/student/evaluate_detail',
    method: 'get',
    params: { id }
  })
}

export function default_student() {
  return request({
    url: '/api/config/get/default_student',
    method: 'get',
    params: { }
  })
}

//所有学级信息
export function grade_year() {
  return request({
    url: '/api/student/grade_year',
    method: 'get',
    params: { }
  })
}

// 所有学年信息
export function school_year() {
  return request({
    url: '/api/student/school_year',
    method: 'get',
    params: { }
  })
}

// 学生切换-根据条件筛选学生
export function getStudentList(query) {
  return request({
    url: '/api/student/switch_filter',
    method: 'get',
    params: query
  })
}